﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using System.Web.UI;


namespace DOTNET_ASSIGNMENT.Models
{
    //[MetadataType(typeof(CustomerMetadata))]
    public partial class Customer
    {
        [Key]
        public int ID { get; set; }

        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email")]
        [Required(ErrorMessage = "Email is required")]
        [Remote("IsEmailAvailable", "Account", HttpMethod="POST", ErrorMessage = "Email is already available")]
        public string Email { get; set; }

        [Display(Name = "Re-enter Email")]
        [Required(ErrorMessage = "ConfirmEmail is required")]     
        [System.Web.Mvc.Compare("Email", ErrorMessage = "Emails do not match")]
       
        public string ConfirmEmail { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        [Required(ErrorMessage = "Password is required")]  
        [MinLength(8, ErrorMessage = "Minimun length is 8 characters")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Re-enter Password")]
        [Required(ErrorMessage = "ConfirmPassword is required")]
        [System.Web.Mvc.Compare("Password", ErrorMessage = "Passwords do not match.")]
        public string ConfirmPassword { get; set; }
        
        public string Date { get; set; }

        [Display(Name = "Blocked")]
        public bool IsBlocked { get; set; }

        public virtual List<File> Files { get; set; }
    }
}